{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Logistic Regression"
      ],
      "metadata": {}
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Multiple Class Prediction"
      ],
      "metadata": {}
    },
    {
      "cell_type": "markdown",
      "source": [
        "Step 1: Data Pre-Processing"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import pandas as pd\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "# fetch yahoo data\n",
        "import yfinance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:05.410Z",
          "iopub.execute_input": "2020-08-07T00:36:05.417Z",
          "iopub.status.idle": "2020-08-07T00:36:06.242Z",
          "shell.execute_reply": "2020-08-07T00:36:07.767Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# input\n",
        "symbol = 'AMD'\n",
        "start = '2014-01-01'\n",
        "end = '2018-08-27'\n",
        "\n",
        "# Read data \n",
        "dataset = yf.download(symbol,start,end)\n",
        "\n",
        "# Only keep close columns \n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 completed\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 2,
          "data": {
            "text/plain": "            Adj Close  Close  High   Low  Open    Volume\nDate                                                    \n2014-01-02       3.95   3.95  3.98  3.84  3.85  20548400\n2014-01-03       4.00   4.00  4.00  3.88  3.98  22887200\n2014-01-06       4.13   4.13  4.18  3.99  4.01  42398300\n2014-01-07       4.18   4.18  4.25  4.11  4.19  42932100\n2014-01-08       4.18   4.18  4.26  4.14  4.23  30678700",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Adj Close</th>\n      <th>Close</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Open</th>\n      <th>Volume</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-02</th>\n      <td>3.95</td>\n      <td>3.95</td>\n      <td>3.98</td>\n      <td>3.84</td>\n      <td>3.85</td>\n      <td>20548400</td>\n    </tr>\n    <tr>\n      <th>2014-01-03</th>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>3.98</td>\n      <td>22887200</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.01</td>\n      <td>42398300</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.19</td>\n      <td>42932100</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.23</td>\n      <td>30678700</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:06.252Z",
          "iopub.execute_input": "2020-08-07T00:36:06.258Z",
          "iopub.status.idle": "2020-08-07T00:36:07.532Z",
          "shell.execute_reply": "2020-08-07T00:36:07.775Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset['Buy/Sell'] = np.where(dataset['Adj Close'].shift(-1) > dataset['Adj Close'],1,-1)"
      ],
      "outputs": [],
      "execution_count": 3,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:07.548Z",
          "iopub.execute_input": "2020-08-07T00:36:07.560Z",
          "iopub.status.idle": "2020-08-07T00:36:07.575Z",
          "shell.execute_reply": "2020-08-07T00:36:07.781Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset['Increase/Decrease'] = np.where(dataset['Volume'].shift(-1) > dataset['Volume'],1,0)"
      ],
      "outputs": [],
      "execution_count": 4,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:07.587Z",
          "iopub.execute_input": "2020-08-07T00:36:07.596Z",
          "iopub.status.idle": "2020-08-07T00:36:07.613Z",
          "shell.execute_reply": "2020-08-07T00:36:08.657Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 5,
          "data": {
            "text/plain": "            Adj Close  Close  High   Low  Open    Volume  Buy/Sell  \\\nDate                                                                 \n2014-01-02       3.95   3.95  3.98  3.84  3.85  20548400         1   \n2014-01-03       4.00   4.00  4.00  3.88  3.98  22887200         1   \n2014-01-06       4.13   4.13  4.18  3.99  4.01  42398300         1   \n2014-01-07       4.18   4.18  4.25  4.11  4.19  42932100        -1   \n2014-01-08       4.18   4.18  4.26  4.14  4.23  30678700        -1   \n\n            Increase/Decrease  \nDate                           \n2014-01-02                  1  \n2014-01-03                  1  \n2014-01-06                  1  \n2014-01-07                  0  \n2014-01-08                  0  ",
            "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>Adj Close</th>\n      <th>Close</th>\n      <th>High</th>\n      <th>Low</th>\n      <th>Open</th>\n      <th>Volume</th>\n      <th>Buy/Sell</th>\n      <th>Increase/Decrease</th>\n    </tr>\n    <tr>\n      <th>Date</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2014-01-02</th>\n      <td>3.95</td>\n      <td>3.95</td>\n      <td>3.98</td>\n      <td>3.84</td>\n      <td>3.85</td>\n      <td>20548400</td>\n      <td>1</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2014-01-03</th>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>4.00</td>\n      <td>3.88</td>\n      <td>3.98</td>\n      <td>22887200</td>\n      <td>1</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2014-01-06</th>\n      <td>4.13</td>\n      <td>4.13</td>\n      <td>4.18</td>\n      <td>3.99</td>\n      <td>4.01</td>\n      <td>42398300</td>\n      <td>1</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2014-01-07</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.25</td>\n      <td>4.11</td>\n      <td>4.19</td>\n      <td>42932100</td>\n      <td>-1</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>2014-01-08</th>\n      <td>4.18</td>\n      <td>4.18</td>\n      <td>4.26</td>\n      <td>4.14</td>\n      <td>4.23</td>\n      <td>30678700</td>\n      <td>-1</td>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
          },
          "metadata": {}
        }
      ],
      "execution_count": 5,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:07.627Z",
          "iopub.execute_input": "2020-08-07T00:36:07.634Z",
          "iopub.status.idle": "2020-08-07T00:36:07.659Z",
          "shell.execute_reply": "2020-08-07T00:36:08.661Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = dataset.iloc[:, 0:4].values\n",
        "y = dataset.iloc[:, 7].values"
      ],
      "outputs": [],
      "execution_count": 6,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:07.676Z",
          "iopub.execute_input": "2020-08-07T00:36:07.690Z",
          "iopub.status.idle": "2020-08-07T00:36:07.708Z",
          "shell.execute_reply": "2020-08-07T00:36:08.664Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Splitting the dataset into the Training set and Test set\n",
        "from sklearn.model_selection import train_test_split\n",
        "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.25, random_state = 0)"
      ],
      "outputs": [],
      "execution_count": 7,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:07.724Z",
          "iopub.execute_input": "2020-08-07T00:36:07.733Z",
          "iopub.status.idle": "2020-08-07T00:36:08.192Z",
          "shell.execute_reply": "2020-08-07T00:36:08.668Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Feature Scaling\n",
        "from sklearn.preprocessing import StandardScaler\n",
        "sc = StandardScaler()\n",
        "X_train = sc.fit_transform(X_train)\n",
        "X_test = sc.transform(X_test)"
      ],
      "outputs": [],
      "execution_count": 8,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.212Z",
          "iopub.execute_input": "2020-08-07T00:36:08.220Z",
          "iopub.status.idle": "2020-08-07T00:36:08.233Z",
          "shell.execute_reply": "2020-08-07T00:36:08.671Z"
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Step 2: Logistic Regression Model"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "# fit final model\n",
        "from sklearn.linear_model import LogisticRegression\n",
        "model = LogisticRegression()\n",
        "model.fit(X_train, y_train)"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 9,
          "data": {
            "text/plain": "LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n          intercept_scaling=1, max_iter=100, multi_class='warn',\n          n_jobs=None, penalty='l2', random_state=None, solver='warn',\n          tol=0.0001, verbose=0, warm_start=False)"
          },
          "metadata": {}
        }
      ],
      "execution_count": 9,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.248Z",
          "iopub.execute_input": "2020-08-07T00:36:08.257Z",
          "iopub.status.idle": "2020-08-07T00:36:08.316Z",
          "shell.execute_reply": "2020-08-07T00:36:08.675Z"
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Step 3: Predection"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "# Predicting the Test set results\n",
        "y_pred = model.predict(X_test)"
      ],
      "outputs": [],
      "execution_count": 10,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.331Z",
          "iopub.execute_input": "2020-08-07T00:36:08.342Z",
          "iopub.status.idle": "2020-08-07T00:36:08.359Z",
          "shell.execute_reply": "2020-08-07T00:36:08.679Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# show the inputs and predicted outputs\n",
        "for i in range(len(X_test)):\n",
        "\tprint(\"X=%s, Predicted=%s\" % (X_test[i], y_pred[i]))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "X=[1.28092529 1.28092529 1.31536939 1.33290278], Predicted=0\n",
            "X=[0.86500819 0.86500819 0.84102454 0.87833678], Predicted=0\n",
            "X=[-0.63805896 -0.63805896 -0.61632405 -0.64319673], Predicted=0\n",
            "X=[-0.93867239 -0.93867239 -0.9433192  -0.94413629], Predicted=0\n",
            "X=[-1.03956318 -1.03956318 -1.04020663 -1.03462859], Predicted=0\n",
            "X=[-0.95720334 -0.95720334 -0.92918975 -0.95886758], Predicted=0\n",
            "X=[1.33445924 1.33445924 1.39207198 1.34132066], Predicted=0\n",
            "X=[-0.12330995 -0.12330995 -0.14399773 -0.12760104], Predicted=0\n",
            "X=[-0.93249541 -0.93249541 -0.92918975 -0.93150946], Predicted=0\n",
            "X=[1.41064207 1.41064207 1.37592409 1.34763402], Predicted=0\n",
            "X=[-0.63805896 -0.63805896 -0.64256443 -0.65161461], Predicted=0\n",
            "X=[-0.06154003 -0.06154003 -0.07738763 -0.05604895], Predicted=0\n",
            "X=[-0.81719159 -0.81719159 -0.81615441 -0.82418138], Predicted=0\n",
            "X=[0.10523864 0.10523864 0.09822084 0.11230888], Predicted=0\n",
            "X=[-0.90161045 -0.90161045 -0.87267208 -0.89994236], Predicted=0\n",
            "X=[0.65910859 0.65910859 0.63312029 0.66368051], Predicted=0\n",
            "X=[1.3468133  1.3468133  1.31940627 1.37288786], Predicted=0\n",
            "X=[-0.65041293 -0.65041293 -0.65669383 -0.6453012 ], Predicted=0\n",
            "X=[0.94325007 0.94325007 0.91167171 0.9625156 ], Predicted=0\n",
            "X=[-0.53305012 -0.53305012 -0.55173239 -0.55059993], Predicted=0\n",
            "X=[-0.67306191 -0.67306191 -0.6768787  -0.66634595], Predicted=0\n",
            "X=[-0.83572259 -0.83572259 -0.83835776 -0.83891267], Predicted=0\n",
            "X=[-0.57628904 -0.57628904 -0.56586184 -0.56743569], Predicted=0\n",
            "X=[-0.58658406 -0.58658406 -0.57191735 -0.60321174], Predicted=0\n",
            "X=[1.19856553 1.19856553 1.17407524 1.23609704], Predicted=0\n",
            "X=[-0.94073139 -0.94073139 -0.94533769 -0.93782287], Predicted=0\n",
            "X=[-0.80071964 -0.80071964 -0.802025   -0.79471874], Predicted=0\n",
            "X=[1.10591075 1.10591075 1.09535413 1.1287689 ], Predicted=0\n",
            "X=[1.01531481 1.01531481 1.04892879 1.06773921], Predicted=0\n",
            "X=[-0.33538649 -0.33538649 -0.35593906 -0.43485401], Predicted=0\n",
            "X=[0.16083153 0.16083153 0.14262754 0.16492069], Predicted=0\n",
            "X=[1.20474246 1.20474246 1.17205671 1.2213658 ], Predicted=0\n",
            "X=[0.71058349 0.71058349 0.70780433 0.65736715], Predicted=0\n",
            "X=[-1.03338619 -1.03338619 -1.03213268 -1.03041964], Predicted=0\n",
            "X=[1.41064207 1.41064207 1.3658316  1.27397761], Predicted=0\n",
            "X=[0.54380472 0.54380472 0.62706488 0.58160621], Predicted=0\n",
            "X=[-0.59893803 -0.59893803 -0.61228708 -0.5990028 ], Predicted=0\n",
            "X=[-0.98191132 -0.98191132 -0.98570742 -1.00306151], Predicted=0\n",
            "X=[-0.97573429 -0.97573429 -0.98368893 -0.97780786], Predicted=0\n",
            "X=[0.84235911 0.84235911 0.80469188 0.7562774 ], Predicted=0\n",
            "X=[-1.00456025 -1.00456025 -1.01396628 -1.01779282], Predicted=0\n",
            "X=[-0.91396441 -0.91396441 -0.91506034 -0.92940499], Predicted=0\n",
            "X=[1.32622326 1.32622326 1.29518443 1.33921614], Predicted=0\n",
            "X=[2.00157411 2.00157411 1.97945208 1.98318476], Predicted=0\n",
            "X=[-0.34362256 -0.34362256 -0.3196063  -0.34646616], Predicted=0\n",
            "X=[-0.8686665  -0.8686665  -0.87469057 -0.86416631], Predicted=0\n",
            "X=[0.88559804 0.88559804 0.8995607  0.91621735], Predicted=0\n",
            "X=[-1.04985817 -1.04985817 -1.03415117 -1.04304649], Predicted=0\n",
            "X=[-0.85013555 -0.85013555 -0.85046873 -0.84312161], Predicted=0\n",
            "X=[0.87118513 0.87118513 0.82689518 0.85729198], Predicted=0\n",
            "X=[0.70028847 0.70028847 0.66339754 0.68893435], Predicted=0\n",
            "X=[1.66183964 1.66183964 1.6262166  1.63594691], Predicted=0\n",
            "X=[-0.8316046  -0.8316046  -0.83835776 -0.83049479], Predicted=0\n",
            "X=[1.54653577 1.54653577 1.48694079 1.50967849], Predicted=0\n",
            "X=[0.96589895 0.96589895 0.92176419 0.94988887], Predicted=0\n",
            "X=[1.09149764 1.09149764 1.12966844 1.12035102], Predicted=0\n",
            "X=[-0.11713292 -0.11713292 -0.09959103 -0.091825  ], Predicted=0\n",
            "X=[1.25209947 1.25209947 1.27499966 1.28239549], Predicted=0\n",
            "X=[0.71470138 0.71470138 0.73000764 0.75417288], Predicted=0\n",
            "X=[-0.94279038 -0.94279038 -0.94937466 -0.9357184 ], Predicted=0\n",
            "X=[-1.05809415 -1.05809415 -1.05029906 -1.0725091 ], Predicted=0\n",
            "X=[-0.68747487 -0.68747487 -0.68091567 -0.67476383], Predicted=0\n",
            "X=[-0.97573429 -0.97573429 -0.9735965  -0.97359892], Predicted=0\n",
            "X=[1.14503158 1.14503158 1.09535413 1.13929131], Predicted=0\n",
            "X=[-0.67100287 -0.67100287 -0.66880475 -0.66213701], Predicted=0\n",
            "X=[-0.78424769 -0.78424769 -0.78587706 -0.77577851], Predicted=0\n",
            "X=[0.96795799 0.96795799 0.92580107 0.89727707], Predicted=0\n",
            "X=[-0.89131548 -0.89131548 -0.89487548 -0.88942001], Predicted=0\n",
            "X=[-0.86043052 -0.86043052 -0.86661662 -0.85574843], Predicted=0\n",
            "X=[-1.03956318 -1.03956318 -1.02002174 -1.03462859], Predicted=0\n",
            "X=[0.09288467 0.09288467 0.11436873 0.10599542], Predicted=0\n",
            "X=[-0.98191132 -0.98191132 -0.98570742 -0.97359892], Predicted=0\n",
            "X=[1.0709078  1.0709078  1.07315082 0.9519934 ], Predicted=0\n",
            "X=[0.73117333 0.73117333 0.76028508 0.72260588], Predicted=0\n",
            "X=[-0.93249541 -0.93249541 -0.9433192  -0.95465864], Predicted=0\n",
            "X=[-0.6586489  -0.6586489  -0.66274929 -0.64951014], Predicted=0\n",
            "X=[1.38387509 1.38387509 1.45060813 1.41497727], Predicted=0\n",
            "X=[-0.9880883  -0.9880883  -0.98772591 -0.98622574], Predicted=0\n",
            "X=[-0.94073139 -0.94073139 -0.94533769 -0.93361393], Predicted=0\n",
            "X=[2.05098996 2.05098996 2.00972932 2.06315454], Predicted=0\n",
            "X=[-0.90984643 -0.90984643 -0.89487548 -0.90204683], Predicted=0\n",
            "X=[-0.02241909 -0.02241909 -0.00472202 -0.0097506 ], Predicted=0\n",
            "X=[-0.84189957 -0.84189957 -0.8545057  -0.84733055], Predicted=0\n",
            "X=[-0.82748661 -0.82748661 -0.81211744 -0.81576349], Predicted=0\n",
            "X=[0.6735215  0.6735215  0.63110175 0.67630743], Predicted=0\n",
            "X=[1.13679561 1.13679561 1.19224148 1.17296283], Predicted=0\n",
            "X=[0.74764548 0.74764548 0.7057858  0.72681472], Predicted=0\n",
            "X=[-0.94896736 -0.94896736 -0.9594671  -0.95676311], Predicted=0\n",
            "X=[-1.00044226 -1.00044226 -0.98974439 -1.00095703], Predicted=0\n",
            "X=[-0.6771799  -0.6771799  -0.67082324 -0.66634595], Predicted=0\n",
            "X=[-0.625705   -0.625705   -0.63247195 -0.61583861], Predicted=0\n",
            "X=[-0.5371681  -0.5371681  -0.54769542 -0.53165975], Predicted=0\n",
            "X=[1.48476605 1.48476605 1.43647858 1.43181303], Predicted=0\n",
            "X=[1.31181035 1.31181035 1.30325838 1.3560519 ], Predicted=0\n",
            "X=[1.51565091 1.51565091 1.47886685 1.55808125], Predicted=0\n",
            "X=[-0.8666075  -0.8666075  -0.87267208 -0.87047977], Predicted=0\n",
            "X=[0.04552776 0.04552776 0.08610992 0.07442831], Predicted=0\n",
            "X=[-0.87690247 -0.87690247 -0.86459813 -0.87258424], Predicted=0\n",
            "X=[-0.53305012 -0.53305012 -0.54971395 -0.55480887], Predicted=0\n",
            "X=[1.23150943 1.23150943 1.25885177 1.25082828], Predicted=0\n",
            "X=[1.08326166 1.08326166 1.0388365  1.09088854], Predicted=0\n",
            "X=[1.2068015  1.2068015  1.16801964 1.2318882 ], Predicted=0\n",
            "X=[1.48888394 1.48888394 1.61612412 1.46338004], Predicted=0\n",
            "X=[1.40240609 1.40240609 1.36381307 1.40866371], Predicted=0\n",
            "X=[0.07023569 0.07023569 0.08610992 0.09547301], Predicted=0\n",
            "X=[1.00707883 1.00707883 0.9661708  1.00670952], Predicted=0\n",
            "X=[-0.96132133 -0.96132133 -0.96754104 -0.96097205], Predicted=0\n",
            "X=[-0.58040703 -0.58040703 -0.59210222 -0.56954021], Predicted=0\n",
            "X=[-0.54334514 -0.54334514 -0.55576936 -0.53376417], Predicted=0\n",
            "X=[-0.70188783 -0.70188783 -0.70110058 -0.69370406], Predicted=0\n",
            "X=[-0.94073139 -0.94073139 -0.95139315 -0.94413629], Predicted=0\n",
            "X=[-0.94896736 -0.94896736 -0.95139315 -0.93992734], Predicted=0\n",
            "X=[-0.74306776 -0.74306776 -0.73743334 -0.72948011], Predicted=0\n",
            "X=[-0.93249541 -0.93249541 -0.94130072 -0.94624076], Predicted=0\n",
            "X=[-0.95308535 -0.95308535 -0.95341164 -0.94413629], Predicted=0\n",
            "X=[-0.88102051 -0.88102051 -0.87267208 -0.88521107], Predicted=0\n",
            "X=[-0.65658991 -0.65658991 -0.66274929 -0.65161461], Predicted=0\n",
            "X=[-0.93043642 -0.93043642 -0.93928218 -0.92519605], Predicted=0\n",
            "X=[1.22327346 1.22327346 1.18214919 1.21926128], Predicted=0\n",
            "X=[1.80802837 1.80802837 1.75741827 1.74537937], Predicted=0\n",
            "X=[1.80391028 1.80391028 1.98550768 1.83376722], Predicted=0\n",
            "X=[-0.05124511 -0.05124511 -0.02288845 -0.03710867], Predicted=0\n",
            "X=[1.82038223 1.82038223 1.78769571 1.739066  ], Predicted=0\n",
            "X=[-0.54952217 -0.54952217 -0.55980634 -0.54218205], Predicted=0\n",
            "X=[-0.71630079 -0.71630079 -0.69706361 -0.70422642], Predicted=0\n",
            "X=[0.59322078 0.59322078 0.56045477 0.48269596], Predicted=0\n",
            "X=[-0.04506808 -0.04506808 -0.06123974 -0.04342213], Predicted=0\n",
            "X=[-0.8336636  -0.8336636  -0.82422836 -0.83049479], Predicted=0\n",
            "X=[1.30563322 1.30563322 1.34564664 1.3350073 ], Predicted=0\n",
            "X=[-0.64423594 -0.64423594 -0.65467535 -0.64319673], Predicted=0\n",
            "X=[-1.03338619 -1.03338619 -1.01598477 -1.0262107 ], Predicted=0\n",
            "X=[1.97892502 1.97892502 1.98752583 2.04000561], Predicted=0\n",
            "X=[-0.65453091 -0.65453091 -0.65669383 -0.65161461], Predicted=0\n",
            "X=[0.61586966 0.61586966 0.61899093 0.56266593], Predicted=0\n",
            "X=[1.20886055 1.20886055 1.22453745 1.26135069], Predicted=0\n",
            "X=[-0.51657816 -0.51657816 -0.50934413 -0.51061494], Predicted=0\n",
            "X=[-0.80071964 -0.80071964 -0.81009895 -0.81786796], Predicted=0\n",
            "X=[-0.38480244 -0.38480244 -0.39025338 -0.38013768], Predicted=0\n",
            "X=[-0.19537479 -0.19537479 -0.19445995 -0.20546649], Predicted=0\n",
            "X=[-0.89955146 -0.89955146 -0.89689397 -0.89783789], Predicted=0\n",
            "X=[-0.65658991 -0.65658991 -0.66880475 -0.65161461], Predicted=0\n",
            "X=[-0.59276099 -0.59276099 -0.59008368 -0.59479386], Predicted=0\n",
            "X=[-1.00867824 -1.00867824 -1.00791082 -1.01147939], Predicted=0\n",
            "X=[-0.37450742 -0.37450742 -0.38217943 -0.36751086], Predicted=0\n",
            "X=[-0.88102051 -0.88102051 -0.87670905 -0.89152448], Predicted=0\n",
            "X=[-0.85219454 -0.85219454 -0.8545057  -0.86416631], Predicted=0\n",
            "X=[0.85471317 0.85471317 0.91167171 0.84676978], Predicted=0\n",
            "X=[1.54653577 1.54653577 1.50712576 1.42970851], Predicted=0\n",
            "X=[-0.97573429 -0.97573429 -0.9735965  -0.9714944 ], Predicted=0\n",
            "X=[1.63919075 1.63919075 1.59190228 1.65909603], Predicted=0\n",
            "X=[-0.59482004 -0.59482004 -0.61228708 -0.60321174], Predicted=0\n",
            "X=[0.36879018 0.36879018 0.33842097 0.35853206], Predicted=0\n",
            "X=[-0.85013555 -0.85013555 -0.84643176 -0.84733055], Predicted=0\n",
            "X=[1.04414083 1.04414083 1.099391   1.03617221], Predicted=0\n",
            "X=[-0.84807656 -0.84807656 -0.85854267 -0.85574843], Predicted=0\n",
            "X=[1.19032955 1.19032955 1.13976093 1.13929131], Predicted=0\n",
            "X=[-0.86454851 -0.86454851 -0.86459813 -0.85995737], Predicted=0\n",
            "X=[0.84030026 0.84030026 0.83295059 0.88885918], Predicted=0\n",
            "X=[-1.04574018 -1.04574018 -1.03616965 -1.03883755], Predicted=0\n",
            "X=[1.35710812 1.35710812 1.31133233 1.34763402], Predicted=0\n",
            "X=[1.09355668 1.09355668 1.06507688 1.02775433], Predicted=0\n",
            "X=[0.71676042 0.71676042 0.73404471 0.73102376], Predicted=0\n",
            "X=[-0.61335098 -0.61335098 -0.59815763 -0.60531626], Predicted=0\n",
            "X=[1.40240609 1.40240609 1.36179454 1.36026094], Predicted=0\n",
            "X=[1.06267182 1.06267182 1.08728018 1.0761571 ], Predicted=0\n",
            "X=[-0.85013555 -0.85013555 -0.8545057  -0.86206184], Predicted=0\n",
            "X=[0.62822353 0.62822353 0.6391757  0.66788955], Predicted=0\n",
            "X=[0.83618218 0.83618218 0.80065481 0.79415797], Predicted=0\n",
            "X=[0.99472497 0.99472497 1.02672549 1.04669461], Predicted=0\n",
            "X=[-0.85837153 -0.85837153 -0.85652419 -0.85153949], Predicted=0\n",
            "X=[1.28092529 1.28092529 1.23462974 1.29081337], Predicted=0\n",
            "X=[1.03796389 1.03796389 1.02067008 1.02985885], Predicted=0\n",
            "X=[-0.59276099 -0.59276099 -0.58604671 -0.58216704], Predicted=0\n",
            "X=[-1.02103223 -1.02103223 -1.02002174 -1.0262107 ], Predicted=0\n",
            "X=[-0.84189957 -0.84189957 -0.83432079 -0.84101714], Predicted=0\n",
            "X=[0.65704954 0.65704954 0.61899093 0.64684474], Predicted=0\n",
            "X=[0.91236501 0.91236501 0.8995607  0.91832167], Predicted=0\n",
            "X=[-1.04162217 -1.04162217 -1.03616965 -1.03673306], Predicted=0\n",
            "X=[-0.59276099 -0.59276099 -0.60825011 -0.5990028 ], Predicted=0\n",
            "X=[-0.86454851 -0.86454851 -0.87065359 -0.87468871], Predicted=0\n",
            "X=[-1.06015314 -1.06015314 -1.06241    -1.05777778], Predicted=0\n",
            "X=[-0.84601756 -0.84601756 -0.84643176 -0.84522608], Predicted=0\n",
            "X=[0.88148015 0.88148015 0.90965318 0.89517255], Predicted=0\n",
            "X=[-0.87690247 -0.87690247 -0.85652419 -0.88100213], Predicted=0\n",
            "X=[-0.92631838 -0.92631838 -0.93524521 -0.94624076], Predicted=0\n",
            "X=[1.32416422 1.32416422 1.2992215  1.32658942], Predicted=0\n",
            "X=[-0.29626565 -0.29626565 -0.30951382 -0.34857058], Predicted=0\n",
            "X=[-0.55364016 -0.55364016 -0.56384341 -0.55691339], Predicted=0\n",
            "X=[-0.87278448 -0.87278448 -0.87469057 -0.86627078], Predicted=0\n",
            "X=[-0.86454851 -0.86454851 -0.87267208 -0.86206184], Predicted=0\n",
            "X=[-0.85013555 -0.85013555 -0.85854267 -0.84522608], Predicted=0\n",
            "X=[0.65910859 0.65910859 0.66945314 0.67420291], Predicted=0\n",
            "X=[-1.04162217 -1.04162217 -1.0442436  -1.04094202], Predicted=0\n",
            "X=[-0.84807656 -0.84807656 -0.8545057  -0.84312161], Predicted=0\n",
            "X=[0.6035156  0.6035156  0.60486138 0.64053138], Predicted=0\n",
            "X=[1.38593414 1.38593414 1.33151729 1.36867882], Predicted=0\n",
            "X=[-0.58452502 -0.58452502 -0.58402827 -0.58216704], Predicted=0\n",
            "X=[0.80323827 0.80323827 0.77037756 0.77942653], Predicted=0\n",
            "X=[0.81147425 0.81147425 0.83496913 0.8383517 ], Predicted=0\n",
            "X=[1.21503748 1.21503748 1.16398276 1.18348523], Predicted=0\n",
            "X=[1.14503158 1.14503158 1.21646351 1.19611216], Predicted=0\n",
            "X=[-0.94896736 -0.94896736 -0.95744861 -0.95465864], Predicted=0\n",
            "X=[-0.87072549 -0.87072549 -0.88276451 -0.86627078], Predicted=0\n",
            "X=[1.37152123 1.37152123 1.35372059 1.40235035], Predicted=0\n",
            "X=[-0.51246018 -0.51246018 -0.51539963 -0.51061494], Predicted=0\n",
            "X=[-0.86248951 -0.86248951 -0.86257965 -0.85995737], Predicted=0\n",
            "X=[-0.94279038 -0.94279038 -0.94937466 -0.93782287], Predicted=0\n",
            "X=[-0.98397031 -0.98397031 -0.97965196 -0.97780786], Predicted=0\n",
            "X=[-0.60099702 -0.60099702 -0.60623157 -0.59058492], Predicted=0\n",
            "X=[-0.97985227 -0.97985227 -0.97965196 -0.98833021], Predicted=0\n",
            "X=[-0.88102051 -0.88102051 -0.88680149 -0.90625577], Predicted=0\n",
            "X=[-0.70806481 -0.70806481 -0.64861989 -0.7231667 ], Predicted=0\n",
            "X=[-0.70394682 -0.70394682 -0.69100815 -0.70212195], Predicted=0\n",
            "X=[-1.02720921 -1.02720921 -1.01598477 -1.03041964], Predicted=0\n",
            "X=[1.30975131 1.30975131 1.37390555 1.36026094], Predicted=0\n",
            "X=[0.82176927 0.82176927 0.82891372 0.86781438], Predicted=0\n",
            "X=[2.65221683 2.65221683 2.58096153 2.52192957], Predicted=0\n",
            "X=[1.44358597 1.44358597 1.56364338 1.49915608], Predicted=0\n",
            "X=[-0.95102636 -0.95102636 -0.94735618 -0.9504497 ], Predicted=0\n",
            "X=[-0.17272581 -0.17272581 -0.1641827  -0.16337709], Predicted=0\n",
            "X=[-0.106838   -0.106838   -0.1197759  -0.08761606], Predicted=0\n",
            "X=[1.01325596 1.01325596 0.98837429 0.98566492], Predicted=0\n",
            "X=[-0.08624806 -0.08624806 -0.08546158 -0.07919817], Predicted=0\n",
            "X=[-0.96543932 -0.96543932 -0.96754104 -0.96307652], Predicted=0\n",
            "X=[0.77029437 0.77029437 0.7945994  0.80468017], Predicted=0\n",
            "X=[0.01258376 0.01258376 0.02353679 0.02602544], Predicted=0\n",
            "X=[-0.86248951 -0.86248951 -0.84643176 -0.88100213], Predicted=0\n",
            "X=[0.85471317 0.85471317 0.839006   0.81309805], Predicted=0\n",
            "X=[-0.17890284 -0.17890284 -0.16821967 -0.16758603], Predicted=0\n",
            "X=[2.58221093 2.58221093 2.50425914 2.46510872], Predicted=0\n",
            "X=[-0.63394097 -0.63394097 -0.60017616 -0.62004755], Predicted=0\n",
            "X=[0.73529142 0.73529142 0.71587828 0.7562774 ], Predicted=0\n",
            "X=[-0.66894387 -0.66894387 -0.6768787  -0.67055489], Predicted=0\n",
            "X=[0.91030616 0.91030616 0.91570859 0.81730709], Predicted=0\n",
            "X=[-0.56187613 -0.56187613 -0.57191735 -0.56112233], Predicted=0\n",
            "X=[1.05649489 1.05649489 1.04085485 1.04459009], Predicted=0\n",
            "X=[1.42711402 1.42711402 1.39610885 1.41708159], Predicted=0\n",
            "X=[1.15120852 1.15120852 1.17003817 1.18138071], Predicted=0\n",
            "X=[0.74764548 0.74764548 0.73202617 0.74785952], Predicted=0\n",
            "X=[-0.59276099 -0.59276099 -0.59412066 -0.57585358], Predicted=0\n",
            "X=[-0.92837737 -0.92837737 -0.93524521 -0.93361393], Predicted=0\n",
            "X=[1.66801657 1.66801657 1.70695606 1.73275244], Predicted=0\n",
            "X=[1.07914377 1.07914377 1.0388365  1.09509738], Predicted=0\n",
            "X=[1.03384581 1.03384581 1.04287338 1.06353037], Predicted=0\n",
            "X=[-0.85425354 -0.85425354 -0.84441327 -0.84522608], Predicted=0\n",
            "X=[2.05510805 2.05510805 1.98752583 2.04842329], Predicted=0\n",
            "X=[-0.65658991 -0.65658991 -0.66274929 -0.64319673], Predicted=0\n",
            "X=[1.37769816 1.37769816 1.37794243 1.36867882], Predicted=0\n",
            "X=[1.9500992  1.9500992  1.88861994 1.83797606], Predicted=0\n",
            "X=[-0.80483763 -0.80483763 -0.79395106 -0.79261427], Predicted=0\n",
            "X=[0.96383991 0.96383991 1.0388365  0.8804413 ], Predicted=0\n",
            "X=[1.03178676 1.03178676 1.05700293 1.03406769], Predicted=0\n",
            "X=[1.34269521 1.34269521 1.45464501 1.38341007], Predicted=0\n",
            "X=[-0.57217105 -0.57217105 -0.59008368 -0.56954021], Predicted=0\n",
            "X=[1.48476605 1.48476605 1.44455253 1.50546945], Predicted=0\n",
            "X=[-0.96543932 -0.96543932 -0.97561499 -0.98412127], Predicted=0\n",
            "X=[1.24798139 1.24798139 1.19426001 1.23609704], Predicted=0\n",
            "X=[1.83479534 1.83479534 1.79173259 1.85481202], Predicted=0\n",
            "X=[-0.60305601 -0.60305601 -0.59008368 -0.58637598], Predicted=0\n",
            "X=[1.06267182 1.06267182 1.05700293 1.08878402], Predicted=0\n",
            "X=[-0.57628904 -0.57628904 -0.59210222 -0.58006257], Predicted=0\n",
            "X=[-0.5371681  -0.5371681  -0.54164001 -0.53586869], Predicted=0\n",
            "X=[-0.95514435 -0.95514435 -0.92515278 -0.95465864], Predicted=0\n",
            "X=[0.16083153 0.16083153 0.14464607 0.06811495], Predicted=0\n",
            "X=[0.14435958 0.14435958 0.15272002 0.17333857], Predicted=0\n",
            "X=[1.35916717 1.35916717 1.31133233 1.34973854], Predicted=0\n",
            "X=[1.3282823  1.3282823  1.29720297 1.36026094], Predicted=0\n",
            "X=[-0.20361077 -0.20361077 -0.16014572 -0.18863073], Predicted=0\n",
            "X=[0.96795799 0.96795799 0.93791208 0.95830676], Predicted=0\n",
            "X=[-0.6607079  -0.6607079  -0.66274929 -0.65371908], Predicted=0\n",
            "X=[0.84441815 0.84441815 0.86322804 0.82993381], Predicted=0\n",
            "X=[0.94736796 0.94736796 0.92983814 0.96041128], Predicted=0\n",
            "X=[-0.5742301  -0.5742301  -0.53760303 -0.56322675], Predicted=0\n",
            "X=[-1.06838912 -1.06838912 -1.06039152 -1.0640912 ], Predicted=0\n",
            "X=[-1.01485522 -1.01485522 -1.01800325 -1.0493599 ], Predicted=0\n",
            "X=[1.48888394 1.48888394 1.4707929  1.49705156], Predicted=0\n",
            "X=[2.01804606 2.01804606 2.07028421 2.01264725], Predicted=0\n",
            "X=[-0.56805306 -0.56805306 -0.57595433 -0.58006257], Predicted=0\n",
            "X=[-0.9366134 -0.9366134 -0.9372637 -0.9357184], Predicted=0\n",
            "X=[-0.13566391 -0.13566391 -0.07738763 -0.12549652], Predicted=0\n",
            "X=[-0.6586489  -0.6586489  -0.65467535 -0.64319673], Predicted=0\n",
            "X=[0.75999935 0.75999935 0.77441444 0.80257585], Predicted=0\n",
            "X=[-0.59687903 -0.59687903 -0.61430557 -0.75052481], Predicted=0\n",
            "X=[0.93707294 0.93707294 0.9278196  0.96462012], Predicted=0\n",
            "X=[1.67007562 1.67007562 1.67667881 1.7285436 ], Predicted=0\n",
            "X=[1.36534429 1.36534429 1.34160977 1.36236546], Predicted=0\n",
            "X=[0.6220466  0.6220466  0.61091698 0.61738226], Predicted=0\n",
            "X=[-0.9366134  -0.9366134  -0.93524521 -0.96307652], Predicted=0\n",
            "X=[-0.89955146 -0.89955146 -0.90496791 -0.92519605], Predicted=0\n",
            "X=[-0.53510916 -0.53510916 -0.55173239 -0.54218205], Predicted=0\n",
            "X=[1.94186303 1.94186303 1.91486051 1.90111027], Predicted=0\n",
            "X=[1.70301952 1.70301952 1.64438303 1.68224515], Predicted=0\n",
            "X=[-0.85219454 -0.85219454 -0.85046873 -0.84733055], Predicted=0\n"
          ]
        }
      ],
      "execution_count": 11,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.373Z",
          "iopub.execute_input": "2020-08-07T00:36:08.382Z",
          "iopub.status.idle": "2020-08-07T00:36:08.427Z",
          "shell.execute_reply": "2020-08-07T00:36:08.684Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "(\"X=%s, Predicted=%s\" % (X_test[0], y_pred[0]))"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 12,
          "data": {
            "text/plain": "'X=[1.28092529 1.28092529 1.31536939 1.33290278], Predicted=0'"
          },
          "metadata": {}
        }
      ],
      "execution_count": 12,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.444Z",
          "iopub.execute_input": "2020-08-07T00:36:08.454Z",
          "iopub.status.idle": "2020-08-07T00:36:08.474Z",
          "shell.execute_reply": "2020-08-07T00:36:08.690Z"
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Step 4: Evaluating The Predection"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "# Making the Confusion Matrix\n",
        "from sklearn.metrics import confusion_matrix\n",
        "cm = confusion_matrix(y_test, y_pred)"
      ],
      "outputs": [],
      "execution_count": 13,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.488Z",
          "iopub.execute_input": "2020-08-07T00:36:08.496Z",
          "iopub.status.idle": "2020-08-07T00:36:08.509Z",
          "shell.execute_reply": "2020-08-07T00:36:08.695Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "print(cm)"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[[153   0]\n",
            " [140   0]]\n"
          ]
        }
      ],
      "execution_count": 14,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.519Z",
          "iopub.execute_input": "2020-08-07T00:36:08.529Z",
          "iopub.status.idle": "2020-08-07T00:36:08.546Z",
          "shell.execute_reply": "2020-08-07T00:36:08.699Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.metrics import classification_report\n",
        "print(classification_report(y_test, y_pred))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "              precision    recall  f1-score   support\n",
            "\n",
            "           0       0.52      1.00      0.69       153\n",
            "           1       0.00      0.00      0.00       140\n",
            "\n",
            "   micro avg       0.52      0.52      0.52       293\n",
            "   macro avg       0.26      0.50      0.34       293\n",
            "weighted avg       0.27      0.52      0.36       293\n",
            "\n"
          ]
        }
      ],
      "execution_count": 15,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.557Z",
          "iopub.execute_input": "2020-08-07T00:36:08.564Z",
          "iopub.status.idle": "2020-08-07T00:36:08.580Z",
          "shell.execute_reply": "2020-08-07T00:36:08.703Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.metrics import accuracy_score\n",
        "# Print the accuracy from the testing data.\n",
        "print(accuracy_score(model.predict(X_test), y_test))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "0.5221843003412969\n"
          ]
        }
      ],
      "execution_count": 16,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.591Z",
          "iopub.execute_input": "2020-08-07T00:36:08.599Z",
          "iopub.status.idle": "2020-08-07T00:36:08.617Z",
          "shell.execute_reply": "2020-08-07T00:36:08.708Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn import metrics\n",
        "\n",
        "print(\"Accuracy:\",metrics.accuracy_score(y_test, y_pred))\n",
        "print(\"Precision:\",metrics.precision_score(y_test, y_pred))\n",
        "print(\"Recall:\",metrics.recall_score(y_test, y_pred))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Accuracy: 0.5221843003412969\n",
            "Precision: 0.0\n",
            "Recall: 0.0\n"
          ]
        }
      ],
      "execution_count": 17,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false,
        "execution": {
          "iopub.status.busy": "2020-08-07T00:36:08.628Z",
          "iopub.execute_input": "2020-08-07T00:36:08.635Z",
          "iopub.status.idle": "2020-08-07T00:36:08.650Z",
          "shell.execute_reply": "2020-08-07T00:36:08.712Z"
        }
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "version": "3.5.5",
      "name": "python",
      "pygments_lexer": "ipython3",
      "codemirror_mode": {
        "version": 3,
        "name": "ipython"
      },
      "mimetype": "text/x-python",
      "nbconvert_exporter": "python",
      "file_extension": ".py"
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    },
    "nteract": {
      "version": "0.24.1"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 4
}